<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
<%@ include file="/includes/taglibs.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>添加用户</title>
<link rel="stylesheet" href="<%=request.getContextPath()%>/css/common.css" type="text/css" />
<script type="text/javascript" src="<%=request.getContextPath()%>/js/jquery-1.4.2.min.js"></script>
<script language="javascript" type="text/javascript" src="<%=request.getContextPath()%>/js/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript">
	var type = '${type}';
	if(type=='edit'){
		alert("修改用户成功！");
	}
</script>
</head>
	<body>
		<div id="man_zone">
		<form action="editUserSave.action" method="post" id="form1" >
		 
			<input type="hidden"  name="user.id" value="${user.id}"/>
			<input type="hidden"  name="user.version" value="${user.version}"/>
		 
		<table class="table_style" border="0" align="center"  cellpadding="3" cellspacing="1" width="800px">
		   	<tr>
		   		<td class="left_title_1">用户名:</td>
		   		<td>
		   		<input type="text" id="user.name" name="user.name" value="${user.name}"/>
		   		<s:if test="hasFieldErrors() && fieldErrors.get('user.name') != null">
					<s:fielderror><s:param>user.name</s:param></s:fielderror>
				</s:if>
		   		</td>
		   		<td class="left_title_1">邮箱:</td>
		   		<td>
		   		<input type="text" id="user.email" name="user.email" value="${user.email}"/>
		   		<s:if test="hasFieldErrors() && fieldErrors.get('user.email') != null">
					<s:fielderror><s:param>user.email</s:param></s:fielderror>
				</s:if>
		   		</td>	
		   	</tr>
		   	<tr>
		   		<td class="left_title_1">电话:</td>
		   		<td>
		   		<input type="text" id="user.tel" name="user.tel" value="${user.tel}"/>
		   		<s:if test="hasFieldErrors() && fieldErrors.get('user.tel') != null">
					<s:fielderror><s:param>user.tel</s:param></s:fielderror>
				</s:if>
		   		</td>
		   		<td class="left_title_1">手机:</td>
		   		<td>
		   		<input type="text" id="user.phone" name="user.phone" value="${user.phone}"/>
		   		<s:if test="hasFieldErrors() && fieldErrors.get('user.phone') != null">
					<s:fielderror><s:param>user.phone</s:param></s:fielderror>
				</s:if>
		   		</td>	
		   	</tr>
		   	<tr>
		   		<td class="left_title_1">用户编号:</td>
		   		<td>
		   		<input type="text" id="user.userNo" name="user.userNo" value="${user.userNo}" readOnly/>
		   		<s:if test="hasFieldErrors() && fieldErrors.get('user.userNo') != null">
					<s:fielderror><s:param>user.userNo</s:param></s:fielderror>
				</s:if>
				<s:actionerror/>
		   		</td>
		   		<td class="left_title_1">地址:</td>
		   		<td>
		   		<input type="text" id="user.address" name="user.address" value="${user.address}"/>
		   		<s:if test="hasFieldErrors() && fieldErrors.get('user.address') != null">
					<s:fielderror><s:param>user.address</s:param></s:fielderror>
				</s:if>
		   		</td>	
		   	</tr>
		   	<tr>
		   		<td class="left_title_1">性别:</td>
		   		<td>
			        <input name="user.sex" type="radio" value="0" <s:if test="#attr.user.sex == 0 ">checked</s:if> /> 男
					<input name="user.sex" type="radio" value="1" <s:if test="#attr.user.sex == 1 ">checked</s:if> />女
				 <s:if test="hasFieldErrors() && fieldErrors.get('user.sex') != null">
					<s:fielderror><s:param>user.sex</s:param></s:fielderror>
				</s:if>
		   		</td>
		   		<td class="left_title_1">密码:</td>
		   		<td>
		   		<input type="text" id="user.password" name="user.password" value="${user.password}"/>
		   		<s:if test="hasFieldErrors() && fieldErrors.get('user.password') != null">
					<s:fielderror><s:param>user.password</s:param></s:fielderror>
				</s:if>
		   		</td>	
		   	</tr>
		   	<tr>
		   		<td class="left_title_1">生日:</td>
		   		<td>
		   		<input type="text" id="user.birthDate" name="user.birthDate" value='<s:date name="user.birthDate" format="yyyy-MM-dd"/>' onClick="WdatePicker()" readonly/>
		   		<s:if test="hasFieldErrors() && fieldErrors.get('user.birthDate') != null">
					<s:fielderror><s:param>user.birthDate</s:param></s:fielderror>
				</s:if>
		   		</td>	
		   		<td colspan="2"></td>
		   	</tr>
	        <tr>   	
	        </tr>
		  </table>
		  <table class="table_style" border="0" align="center"  cellpadding="3" cellspacing="0">
       		<tr>
         <td>
          <input type="submit" value="提交" />
          <span class="sub_sp">&nbsp;</span>
          <s:reset value="重置"/>  
         </td>
       </tr>
	</table>
		</form>
		</div>
	</body>
</html>